package com.study.common.vo;

import com.study.common.entity.DoctorEntity;
import com.study.common.entity.PatientEntity;
import com.study.common.entity.PrescriptionEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class PrescriptionVo extends PrescriptionEntity
{
    private MedicineWithCover medicine;
    private PatientEntity patient;
    private DoctorEntity doctor;

    public PrescriptionVo(PrescriptionEntity prescription)
    {
        BeanUtils.copyProperties(prescription, this);
    }
}
